Method, system, and memory for reshaping the frame edges of a window around information displayed in the window

ABSTRACT

A method, system, and memory for reshaping a window are provided. The method includes the step of reshaping the frame of a window around information displayed in the window in accordance with a preference setting and in response to a command from user controls. The system includes a display for displaying information stored in a window, user controls, and a processor for reshaping the frame of the window around the information in response to a command from the user controls. The memory includes computer readable program code that is stored in the memory. The program code directs a computer system to reshape the frame of a window around information that is displayed within the window.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to graphical user interfaces(GUIs) of computer operating systems and application programs and, moreparticularly, but without limitation, to a method and system formodifying windows.

2. Background Information and Description of Related Art

A computer workstation requires an operating system to manage and directworkstation objects during the performance of workstation tasks, such asadding/deleting users, printing, storing/retrieving data,adding/removing peripherals, etc. Before the performance of aworkstation task, the user typically must access the operating systemand input a command that directs the operating system to perform thedesired task. Graphical user interfaces ("GUIs") provide an interfacebetween a user and the operating system. GUIs typically representobjects (e.g., documents, printers, hard drives, programs, etc) as iconson a display screen. These icons may be individually opened as windowsto show attributes of the object.

FIG. 1 illustrates a prior art, pictorial view of multiple stackedwindows. Computer display screen 8 concurrently displays windows 2, 4,and 6. Window 2 is "stacked on" (i.e. positioned over) window 4, whichis stacked on window 6. Window 2 includes the frame that surrounds thewindow, title bar 10 (which indicates that the window contains adocument), margin 3, and the text in the document. The text in window 2cannot be fully viewed because the window has been reduced in size.

A user frequently desires to selectively resize each stacked window sothat it is as small as possible, but still displays its full contents.For example, the user may desire to simultaneously view the contents ofall the opened windows by making each window as small as possible. Usinga GUI, the user can manipulate the horizontal and vertical size andarrangement of the windows. That is, the user can manipulate the sizeand/or position of a window on the screen. For example, to manipulatethe vertical size and/or position of window 2, the user first positionsmouse cursor 1 over the bottom frame edge of window 2 (see FIG. 1),presses a mouse button (not shown), and then drags the mouse cursorupward or downward to adjust the position of the bottom frame edge ofwindow 2. The user can also drag the top frame edge of window 2.Further, in a similar fashion, the user can adjust the horizontal sizeand/or position of window 2.

If window 2 is horizontally resized, left margin 3 remains. However, thesize of margin 3 will be proportionally reduced or increased accordingto the horizontal size reduction or increase, respectively. If the rightframe edge is positioned closer to the left frame edge (i.e. reduced insize), even less of the text can be viewed by the user. Similarly, ifthe bottom frame edge is positioned closer to the top frame edge, evenless of the text can be viewed by the user. Therefore, when windows areselectively reduced in horizontal and vertical size, frequently theircontents cannot be entirely seen.

Accordingly, there is a need for a technique that enables a user tomodify the shape of a window so that the window is the smallest possiblesize, yet continues to display its contents.

SUMMARY OF THE INVENTION

It is an object of the present invention to provide a method and systemfor reshaping a window. The method includes the step of reshaping thewindow around information within the window according to a reshapepreference setting.

The system includes a display for displaying the window, a processor,and, in response to a command from user controls, means for controllingthe processor to reshape the window around information within the windowaccording to a reshape preference setting.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a prior art pictorial view of multiple, stackedwindows.

FIG. 2 is a schematic diagram of representative hardware for use withthe present invention.

FIG. 3 is a pictorial view of resizable windows according to the presentinvention.

FIG. 4 is a menu for setting the reshape preference setting.

FIG. 5 is a flow chart of the reshaping function according to thepresent invention.

FIG. 6 is a pictorial view of the resizable windows of FIG. 3 showingthe scroll bar feature according to the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

The following detailed description is of the best presently contemplatedmode for carrying out the invention. This detailed description is not tobe viewed in a limiting sense, but is made merely for the purpose ofillustrating the general principles of the invention, the scope of whichis only defined by the appended claims.

The preferred embodiment of the present invention includes a system,method, and memory for reshaping windows. The preferred embodiment formspart of an enhanced graphical user interface (GUI) utilized by a user toaccess an operating system in the management and direction ofworkstation operations. More specifically, the preferred embodiment isimplemented within the Window Manager, which is part of the GUI thatinterfaces with the AIX™ operating system. However, one skilled in theart will readily recognize that the present invention could beimplemented in any operating system desktop or graphical user interfaceof an application program.

The present invention may be practiced in any suitable hardwareconfiguration, such as the hardware configuration illustrated in FIG. 2,or, alternatively, a laptop computer. Referring to FIG. 2, workstation200 includes any suitable central processing unit 10, such as aconventional microprocessor (e g., Intel's™ Pentium™ or IBM's™PowerPC™), and a number of other units interconnected via system bus 12.Illustratively, workstation 200 includes random access memory ("RAM")14, read only memory ("ROM") 16, display adapter 36 for connectingsystem bus 12 to display device 38, and I/O adapter 18 for connectingperipheral devices (e.g. disk and tape drives 20) to system bus 12.Workstation 200 further includes user interface adapter 22 forconnecting keyboard 24, mouse 26, speaker 28, microphone 32, and/orother user interface devices, such as a touch screen device (not shown),to system bus 12. Communication adapter 34 connects workstation 200 to adata processing network.

The enhanced GUI, as computer readable program code, resides within amachine-readable media (e.g., memory) to direct the operation ofworkstation 200. Any suitable memory may retain the GUI, such as RAM 14,ROM 16, a magnetic diskette (e.g., floppy diskette), CD-ROM, magnetictape, or optical disk (the last four being located in disk and tapedrives 20). While the specification describes the GUI as performing thefeatures of the invention, in actuality, the GUI merely provides theinstructions for the microprocessor to perform those features.

Referring to FIG. 3, multiple stacked windows can each displayinformation (e.g. text, graphics, icons). In this example, a textprocessing application (e.g. word processor spreadsheet, database) isrunning within window 300. Alternatively, any suitable application couldrun within window 300. In a first embodiment, the GUI allows a user todynamically reshape the window frame of window 300 around each line oftext (referred to as the "shrink wrap" mode), as shown in window 320. Assuch, only the window frame, title bar, menu bar, and text of window 320can be viewed because the GUI removes all empty space in client space,such as left and right margins and blank lines at the beginning and endof the text (e.g. top and bottom margins), from the window.

Scroll bar icon 330 enables the GUI to generate a scroll bar (describedherein, see FIG. 6) so that the user can scroll text (e.g. information)within window 320. In response to scrolling text, the GUI dynamicallyreshapes window frame 332 around each line of text as it is scrolled.Reshaper icon 306 allows the user to reshape window frame 332 of window320 to its original state (i.e. window 300).

In a second embodiment, the GUI reshapes window frame 332 of window 300in a rectangular fashion around the text (e.g. information) according tothe most significant horizontal and most significant vertical textpositions, as shown in window 310 (referred to as the "min X/Y mode").As such, the window frame, title bar, menu bar, and text of window 310are viewed. However, the GUI removes some empty (e.g. white) space, suchas left and right margins and blank lines at the beginning and end ofthe text (e.g. top and bottom margins), from the window.

Scroll bar icon 331 enables the GUI to generate a scroll bar so that theuser can scroll text (e.g. information) within window 310. In response,the GUI dynamically reshapes window frame 332 around the text as it isscrolled. Reshaper icon 306 allows the user to reshape window frame 332of window 310 to its original state (i.e. window 300).

To reshape a window, the GUI provides a "reshaper icon" that allows auser to initiate the reshaping of a window. FIG. 3 illustrates reshapericon 305, which is positioned in the title bar of window 300.Alternatively, reshaper icon 305 may be positioned anywhere in thewindow. Any suitable pointing device, such as a mouse, may be used toposition a mouse cursor over reshaper icon 305. In the preferredembodiment, one click of a first button on the mouse activates reshapericon 305. Upon activating reshaper icon 305, the shape of that window onthe display screen transforms to the shape of the prior setting(referred to as the "reshape preference setting"), which is either theshrink wrap mode (see window 310) or the min x/y mode (see window 320).

If the user desires to change the reshape preference setting, the userpositions the mouse cursor over reshape icon 305 and clicks the secondbutton on the mouse. In response, menu 410 appears. Using the mouse, theuser may select shrink wrap button 420, min x/y button 425, help button430, or quit button 440. If the user selects quit button 440, menu 410disappears and the reshape preference setting remains unaltered. Helpbutton 430 provides a dialogue (not shown) with instructions on how tooperate reshape icon 305. Once the user has selected shrink wrap button420 or min x/y button 425, the user may save the preference setting in adatabase table (not shown) within the GUI (not shown) for that window byselecting OK button 450.

FIG. 5 illustrates a flow chart for reshaping a window according to thepreferred embodiment. Referring to FIGS. 3, 4 and 5, at 510, adetermination is made as to whether the user desires to change thereshape preference setting. In the preferred embodiment, the GUIautomatically sets the reshape preference setting to the shrink wrapmode. If the user desires to change this state, he/she does so bypositioning the mouse cursor over reshape icon 305 and clicking thesecond mouse button. In response, the GUI presents menu 410 to the userwho, in turn, makes a selection at 520 or 530 as to which mode isdesired. The selected mode, if any, is saved in the database tablewithin the GUI at either 525 or 535, respectively. This database tablecontains all information for reshaping the particular window.

A determination is made at 540 as to whether the user desires to reshapethe window. The user does this by positioning the mouse cursor overreshape icon 305 and clicking the first mouse button. If done, at 545,the GUI retrieves the last shape setting (e.g. state) from the databasetable within the GUI for that particular window.

If the last setting was the shrink wrap mode, at 546, the GUI saves acopy of the current window shape state in the database table and, at560, retrieves (e.g. initiates a fetch) for the extents of theapplication running in the window. To do this, the operating systemscans each line of the application for the two most extreme characterpositions within each line. That is, the operating system scans eachline for the left most and right most character positions.Alternatively, any suitable conventional application, such as CommonDesktop Environment™ or CorelDraw™, could provide the GUI with theextents information.

At 565, the GUI adjust the left most and right most vertical frameposition (e.g. vertical frame segment) for each line of the window tothose left most and right most character positions plus one position,respectively. All empty lines at the beginning and end of the text (e.g.top and bottom margins) are removed from the window. The GUI thenhorizontally connects each vertical frame segment. The scroll barfunction will be described herein.

Alternately, if the last state was the min X/Y mode, at 547, the GUIsaves the current window state in a database for that window and, at550, retrieves (e.g. initiates a fetch) for the extents of theapplication running in the window. To do this, the operating systemscans each of the lines and records the two most extreme characterpositions within that line. That is, the operating system scans eachline for the left most and right most character position and storesthose two character positions in a database list. The operating systemthen examines the database list for the most extreme left position andthe most extreme right position of any one line within the application.Alternatively, any suitable conventional application could provide theGUI with the extents information which, in turn, would determine themost extreme left position and the most extreme right position of anyone line within the application.

At 555, the GUI dynamically and uniformly adjust the left and rightvertical frame positions to the most extreme left position plus oneposition and the most extreme right position plus one position,respectively. The GUI then horizontally connects the left most and rightmost vertical frames. The scroll bar function will be described herein.

FIG. 6 is a pictorial view of the resizable windows of FIG. 3, showingthe scroll bar feature according to the preferred embodiment. Referringto FIGS. 5 and 6, after reshaping the window at 565 to the shrink wrapmode, at 570, the user makes a determination as to whether he/shedesires to scroll the text in the window. If not desired, at 574, adetermination is made as to whether the user desires to change thewindow back to the original state. To do this, the user selects reshapericon 306. In response, the GUI searches the database table for thatwindow and retrieves the saved original version of the window.Otherwise, control returns to 570.

If the user desires to scroll the text in the window, any suitablepointing device, such as a mouse, may be used to position the mousecursor over the right arrow of scroll bar icon 330. Over the rightarrow, one click of a first button on the mouse causes the GUI togenerate scroll bar 635. Scroll bars are well known to those skilled inthe art. The length of slider 660 tells the user how much application,if any, extends below window 320. At 571, the GUI monitors up and downarrows 640 and 641 of scroll bar 635. At 572, a determination is made asto whether up arrow 640 or down arrow 641 has been selected. If notselected, control returns to 570, where the GUI determines if the leftarrow number of scroll bar icon 330 has been selected. If the left arrowhas been selected, the GUI removes scroll bar 635 from window 320.

If either up arrow 640 or down arrow 641 of scroll bar 653 has beenselected, at 573, the GUI scrolls the application either up or down,depending on whether the up or down arrow was selected. Control thenreturns to 560 where the GUI begins the process of reshaping the window.

Alternatively, again referring to FIGS. 5 and 6, after reshaping thewindow at 555 to the min x/y mode, at 580, the user makes adetermination as to whether he/she desires to scroll the text in thewindow. If not desired, at 584, a determination is made as to whether tochange the window back to the original state. To do this, the userselects scroll bar icon 306 of window 310. In response, the GUI searchesthe database for that window and retrieves the saved original version ofthe window. Otherwise, control returns to 580.

If the user desires to scroll the text in window 310, any suitablepointing device, such as a mouse, may be used to position the mousecursor over the right arrow of scroll bar icon 331. One click of a firstbutton on the mouse causes the GUI to generate scroll bar 636. At 581,the GUI monitors up and down arrows 650 and 651 of scroll bar 636. At582, a determination is made as to whether either up arrow 650 or downarrow 651 has been selected. If not selected, control returns to 580,where the GUI determines if the left arrow of scroll bar icon 331 hasbeen selected. If the left arrow has been selected, the GUI removesscroll bar 636 from window 310.

If either up arrow 650 or down arrow 651 of scroll bar has beenselected, at 583, the GUI scrolls the application either up or downdepending on whether the up or down arrow was selected. Control thenreturns to 550 where the GUI begins the process of reshaping the window.

The above process of the preferred embodiment is further illustrated bythe following code:

    ______________________________________                                        Preference setting selection:                                                 If Shrink wrap mode selected then                                             set WINDOWMODE = SHRINK;                                                      Else                                                                          If Min X/Y mode selected then                                                 set WINDOWMODE = MINXY;                                                       Endif;                                                                        Else                                                                          ...process other preferences available...                                     Endif;                                                                        Window Mode Change:                                                           If (WINDOWMODE = SHRINK) then                                                 Scan application for extents from every line;                                 Determine windows shape from extents received from                            operating system;                                                             Execute Reshape/Resize event processing;                                      Else                                                                          If (WINDOWMODE = MINXY) then                                                  Scan application for extents;                                                 Determine the most extreme left and most extreme right                        positions;                                                                    Determine windows shape from the most extreme                                 positions;                                                                    Execute Reshape event processing;                                             Endif;                                                                        Endif;                                                                        Reshape/Resize:                                                               Unmanage window to prevent partial redrawing;                                 Adjust window shape and or size according to extents                          passed;                                                                       If scroll bar needed then create scroll bars;                                 Endif                                                                         Manage window to redraw new shape/size                                        ______________________________________                                    

Alternatively, the above process could be implemented using thefollowing code:

    ______________________________________                                        Preference setting selection:                                                 If Shrink wrap mode selected then                                             set WINDOWMODE = SHRINK;                                                      Else                                                                          If Min X/Y mode selected then                                                 set WINDOWMODE = MINXY;                                                       Endif;                                                                        Else                                                                          ...process other preferences available...                                     Endif;                                                                        Window Mode Change:                                                           If (WINDOWMODE = SHRINK) then                                                 Send GET.sub.-- EXTENTS message to application;                               Determine windows shape from extents received from                            application;                                                                  Execute Reshape/Resize event processing;                                      Else                                                                          If (WINDOWMODE = MINXY) then                                                  Send GET.sub.-- XY.sub.-- DIMENSIONS message to application;                  Determine windows shape from extents received from                            application;                                                                  Execute Reshape/Resize event processing;                                      Endif;                                                                        Endif;                                                                        Reshape/Resize:                                                               Unmanage window to prevent partial redrawing;                                 Adjust window shape and or size according to extents passed;                  If scroll bar needed then                                                     create scroll bars;                                                           Endif;                                                                        Manage window to redraw new shape/size;                                       ______________________________________                                    

While the invention has been shown and described with reference toparticular embodiments thereof, it will be understood by those skilledin the art that the foregoing and other changes in form and detail maybe made therein without departing from the spirit and scope of theinvention.

We claim:
 1. A method for directing a computer system, having at least adisplay and user controls, to reshape at least a first portion of atleast one frame edge of at least one window displayed on the display,comprising the steps of:displaying information in the window, theinformation being arranged in a shape within the window, wherein a firstnumber of empty spaces reside between at least a portion of theinformation and the at least first portion of the at least one frameedge; and reshaping the at least first portion of the at least one frameedge around the shape of the information such that a second number ofempty spaces reside between the at least a portion of the informationand the at least one first portion of the at least one frame edge,wherein the second number is less than the first number.
 2. The methodaccording to claim 1 further comprising the step of:reshaping the frameedges of the window around the information on the window in response toa command from the user controls.
 3. The method according to claim 2further comprising the step of:adjusting a preference setting.
 4. Themethod according to claim 3 wherein said adjusting step comprises thesteps of:displaying a reshape adjustment dialog having a plurality ofmode buttons; and activating one of the mode buttons to adjust thepreference setting in response to a selection from the user controls. 5.The method according to claim 4 wherein said step of displaying areshape adjustment dialog comprises the steps of:displaying a shrinkwrap button and a min x/y button; and activating the shrink wrap buttonor the min x/y button in response to a selection from the user controls.6. The method according to claim 2 further comprising the stepof:activating a reshape icon using the user controls to initiate saidreshaping step.
 7. The method according to claim 1 wherein said step ofreshaping the first portion of the frame edge comprises the followingsteps:determining a left most and right most position for each line ofthe information; adjusting a left vertical frame edge to the left mostposition plus one left position for each corresponding line ofinformation, and the right vertical frame edge to the right mostposition plus one right position for each corresponding line ofinformation, thereby forming left and right vertical frame segments; andhorizontally connecting each left vertical frame segment andhorizontally connecting each right vertical frame segment, therebyreshaping the window.
 8. The method according to claim 1 wherein saidstep of reshaping the first portion of the frame edge comprises thefollowing steps:determining a most extreme left position and a mostextreme right position of the information; and adjusting a left verticalframe edge to the most extreme left position plus one left position anda right vertical frame edge to the most extreme right position plus oneright position; and horizontally connecting the left vertical frame edgeto the right vertical frame edge, thereby reshaping the window aroundthe most extreme right and most extreme left positions of theinformation.
 9. A computer system for reshaping at least a first portionof at least one frame edge of at least one window having informationdisplayed therein, comprising:a display for displaying the window, theinformation being arranged in a shape within the window, wherein a firstnumber of empty spaces reside between at least one portion of theinformation and the at least first portion of the at least one frameedge; user controls; and in response to a command from the usercontrols, means for reshaping the at least first portion of the at leastone frame edge around the shape of the information such that a secondnumber of empty spaces reside between the at least one portion of theinformation and the at least first portion of the at least one frameedge, wherein the second number is less than the first amount.
 10. Thesystem according to claim 9 further comprising:means for adjusting apreference setting.
 11. The system according to claim 10 wherein saidmeans for adjusting the preference setting comprises:said display fordisplaying a reshape adjustment dialog having a plurality of modebuttons on said display; and said user controls for selecting one of themode buttons to adjust the preference setting.
 12. The system accordingto claim 11 wherein said means for displaying a reshape adjustmentdialog comprises:said display for displaying a shrink wrap button and amin x/y button; and said user controls for selecting the shrink wrapbutton or the min x/y button using the user controls.
 13. The systemaccording to claim 10 wherein said means for reshaping the at least oneframe edge of the window comprises:means for determining a left most andright most position for each line of the information; means for storingthe left most and right most positions for each line in a list; meansfor examining the list to locate a most extreme left position and a mostextreme right position of the information; means for adjusting a leftvertical frame edge to the most extreme left position plus one leftposition and a right vertical frame edge to the most extreme rightposition plus one right position; and means for horizontally connectingthe left vertical frame edge to the right vertical frame edge, therebyreshaping the window around the information displayed in the window. 14.The system according to claim 9 further comprising:said user controlsfor activating a reshape icon to initiate said means for reshaping. 15.The system according to claim 9 wherein said means for reshaping the atleast one frame edge of the window comprises:means for determining aleft most and right most position for each line of the information;means for adjusting a left vertical frame edge to the left most positionplus one left position for each corresponding line of information, andadjusting a right vertical frame edge to the right most position plusone right position for each corresponding line of information, therebyforming left and right vertical frame segments; and means forhorizontally connecting each left vertical frame segment and forconnecting each right vertical frame segment, thereby reshaping thewindow.
 16. An article of manufacture, comprising:a computer usablemedium having computer readable program code embodied therein forcausing a computer system to reshape at least a first portion of atleast one frame edge of a window around information displayed within thewindow, the information being arranged in a shape within the window,wherein a first amount of empty space resides between at least oneportion of the information and the first portion of the frame edge ofthe window, the computer readable program code comprising: computerreadable program code for reshaping at least the first portion of theframe edge around the shape of the information such that a second amountof empty space resides between the portion of the information and thefirst portion of the frame edge, wherein the second amount is less thanthe first amount.